package com.beordie.service;

import com.beordie.model.User;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @Description 用户的服务层
 * @Date 2021/8/4 19:37
 * @Created 30500
 */
public interface IUserService {
    /**
     * @description 分页查询
     * @author 30500
     * @date 2021/8/4 19:38
     * @type [com.beordie.model.User, int, int]
     * @return com.github.pagehelper.PageInfo<com.beordie.model.User>
     */
    public PageInfo<User> findPage(User condition, int pageNum, int pageSize);

    /**
     * @description 条件查询
     * @author 30500
     * @date 2021/8/4 19:39
     * @type [com.beordie.model.User] 
     * @return java.util.List<com.beordie.model.User>
     */
    public List<User> find(User condition);

    /**
     * @description 添加
     * @author 30500
     * @date 2021/8/4 19:39
     * @type [com.beordie.model.User] 
     * @return int
     */
    public int add(User user);

    /**
     * @description 主键查询
     * @author 30500
     * @date 2021/8/4 19:39
     * @type [java.lang.Integer] 
     * @return com.beordie.model.User
     */
    public User findById(Integer id);

    /**
     * @description 更新
     * @author 30500
     * @date 2021/8/4 19:39
     * @type [com.beordie.model.User] 
     * @return int
     */
    public int update(User user);

    /**
     * @description 主键删除
     * @author 30500
     * @date 2021/8/4 19:39
     * @type [java.lang.Integer] 
     * @return int
     */
    public int delete(Integer id);
}
